package com.gitee.xhs;

import com.gitee.xhs.sampleRecod.transactionRecord.Transaction;
import org.apache.flink.api.common.eventtime.TimestampAssigner;

/**
 * @author BigHead
 * @date 2022/7/18 11:28
 * @description CustomDefaultWatermarkAssigner
 */
public class CustomDefaultTimestampAssigner implements TimestampAssigner<Transaction> {

    public static final String CUSTOM_DEFAULT_WATERMARK_ASSIGNER = "CustomDefaultWatermarkAssigner";

    @Override
    public long extractTimestamp(Transaction element, long recordTimestamp) {
        return element.getTimestamp();
    }

}
